Skip to content

graph: Extract Build() from the BaseGraph class.#5154

Merged
Mizux merged 1 commit intomainfrom
mizux/dev
May 6, 2026
Merged

graph: Extract Build() from the BaseGraph class.#5154
Mizux merged 1 commit intomainfrom
mizux/dev

Conversation

@Mizux
Copy link
Copy Markdown
Collaborator

@Mizux Mizux commented May 6, 2026

  • Add a BaseGraph::Builder class that simply forwards mutable calls (AddNode AddArc, Reserve, Build) to the underlying class.
  • Update clients that use XXXStaticGraph, or a template graph to use Builder. Users who directly use ListGraph do not need to be changed if they do not call Build. If they do, remove the unnecessery call to Build.
  • Move mutable functions from BaseGraph to XXXGraph::Builder.

* Add a BaseGraph::Builder class that simply forwards mutable calls (AddNode AddArc, Reserve, Build) to the underlying class.
* Update clients that use XXXStaticGraph, or a template graph to use Builder. Users who directly use ListGraph do not need to be changed if they do not call Build. If they do, remove the unnecessery call to Build.
* Move mutable functions from BaseGraph to XXXGraph::Builder.
@Mizux Mizux added this to the v10.0 Beta milestone May 6, 2026
@Mizux Mizux self-assigned this May 6, 2026
@Mizux Mizux added Lang: C++ Native implementation issue Solver: Graph and Algorithm Solvers in the graph/ and algorithms/ directories labels May 6, 2026
@Mizux Mizux merged commit cf4e993 into main May 6, 2026
19 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Lang: C++ Native implementation issue Solver: Graph and Algorithm Solvers in the graph/ and algorithms/ directories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant